/*          FILE: lexi.c
 *      Language: C
 *        Author: <Qiwei Feng> <Pufan He> <Yichao Zhou>
 *       Created: 2012-02-26
 * Last Modified: 2012-03-01
 *   Description:
 *       License: GNU GPL v3
 */

#include "token.h"
#include "lexi.h"
#include "common.h"

char *get_statement(char **source)
{
        char *final, *new;

        final = strchr(*source, ';');
        new = malloc(sizeof(char) * (final - *source));
        memcpy(new, final, final - *source);
        *source = final + 1;

        return new;
}

token_t *lexical_process(const char *const source)
{
        char *p, *statement;
        for (p = source; *p;) {
                get_statement
        }
}

/* vim: set sw=8 tw=79 ff=unix et : */
